/* 确认删除弹窗样式 */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.confirm-modal.show .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.confirm-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 18px;
}

.confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.confirm-message {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-task-name {
    font-weight: 500;
    color: #1f2937;
    background: #f9fafb;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
    border-left: 3px solid #3b82f6;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.confirm-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.confirm-btn-cancel:hover {
    background: #e5e7eb;
}

.confirm-btn-delete {
    background: #dc2626;
    color: white;
}

.confirm-btn-delete:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.confirm-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* 任务详情模态框样式 */
.task-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.task-detail-modal.show {
    opacity: 1;
    visibility: visible;
}

.task-detail-dialog {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.task-detail-modal.show .task-detail-dialog {
    transform: scale(1) translateY(0);
}

.task-detail-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-detail-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.task-detail-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
}

.task-detail-close:hover {
    background: #f5f5f5;
    color: #333;
}

.task-detail-content {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.task-detail-field {
    margin-bottom: 20px;
}

.task-detail-field:last-child {
    margin-bottom: 0;
}

.task-detail-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.task-detail-input,
.task-detail-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.task-detail-input:focus,
.task-detail-select:focus {
    outline: none;
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.task-detail-readonly {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.task-detail-actions {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.task-detail-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.task-detail-btn-cancel {
    background: #f8f9fa;
    color: #666;
}

.task-detail-btn-cancel:hover {
    background: #e9ecef;
    color: #333;
}

.task-detail-btn-save {
    background: #ff4757;
    color: white;
}

.task-detail-btn-save:hover {
    background: #ff3742;
}

.task-detail-btn-save:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.delete-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #fee2e2;
}

.setting-select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ff4757;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 设置分组样式 */
.setting-section {
    margin: 24px 0 16px 0;
    padding: 0;
}

.setting-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    padding: 0 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

/* 设置描述样式 */
.setting-desc {
    font-size: 12px;
    color: #9ca3af;
    display: block;
    margin-top: 2px;
    line-height: 1.4;
}

/* 优化设置信息布局 */
.setting-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

/* 优先级相关的设置项样式 */
.setting-section .setting-item {
    padding: 14px 20px;
    transition: background-color 0.2s ease;
}

.setting-section .setting-item:hover {
    background-color: #f9fafb;
}

/* 子级设置项的缩进效果 */
.setting-section .setting-item:not(:first-child) {
    padding-left: 40px;
    position: relative;
}

/* 最后一个子项的连接线样式 */
.setting-section .setting-item:last-child:before {
    background: linear-gradient(to bottom, #e5e7eb 0%, #e5e7eb 30%, transparent 30%);
}

/* 优化开关在优先级设置中的样式 */
.setting-section .toggle-switch {
    flex-shrink: 0;
}

/* 设置标签的优化 */
.setting-section .setting-label {
    font-weight: 500;
    color: #374151;
}

/* 主设置项（显示优先级分组）的特殊样式 */
.setting-section .setting-item:first-child {
    background-color: #f8fafc;
    border-left: 3px solid #3b82f6;
}

.setting-section .setting-item:first-child .setting-label {
    font-weight: 600;
    color: #1e40af;
}

/* 美化提示组件样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #3b82f6;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
    position: relative;
}

.toast.show {
    transform: translateX(0);
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1f2937;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* 不同类型的提示样式 */
.toast.success {
    border-left-color: #10b981;
}

.toast.success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.error .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast.warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.toast.info {
    border-left-color: #3b82f6;
}

.toast.info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

/* 美化确认对话框样式 */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.confirm-modal.show .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.confirm-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #fef3c7;
    color: #f59e0b;
}

.confirm-icon.danger {
    background: #fee2e2;
    color: #ef4444;
}

.confirm-icon.info {
    background: #dbeafe;
    color: #3b82f6;
}

.confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.confirm-content {
    margin-bottom: 24px;
}

.confirm-message {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.confirm-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.confirm-btn-cancel:hover {
    background: #e5e7eb;
}

.confirm-btn-confirm {
    background: #ef4444;
    color: white;
}

.confirm-btn-confirm:hover {
    background: #dc2626;
}

.confirm-btn-confirm.primary {
    background: #3b82f6;
}

.confirm-btn-confirm.primary:hover {
    background: #2563eb;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .confirm-dialog {
        margin: 20px;
        min-width: auto;
        max-width: none;
    }
    
    .confirm-actions {
        flex-direction: column-reverse;
    }
    
    .confirm-btn {
        width: 100%;
    }
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-confirm, .btn-cancel {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 90px;
    position: relative;
    overflow: hidden;
}

.btn-cancel {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-cancel:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-confirm {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-confirm:active, .btn-cancel:active {
    transform: translateY(0);
}